<?php
/**
 * Created by PhpStorm.
 * User: lili
 * Date: 2018/9/18
 * Time: 20:41
 */

namespace app\index\validate;


use think\Validate;

class EGCheck extends Validate
{
    protected  $rule = [
        'token' => 'require',
        'card_num' => 'require',
        'person_name' => 'require',
        'person_type' => 'require|number|in:0,1,2',
        'swipe_time' => 'require|date',
        'swipe_point' => 'require',
        'swipe_type' => 'require',
        'sn' => 'require',
    ];


    protected $msg = [
        'token.require' => '认证token必须存在',
        'card_num.require' => '门禁卡号必须存在',
        'card_num.number' => '门禁卡号必须为数字',
        'card_num.in' => '门禁卡号必须为0或者1或者2',
        'person_name.require' => '人员姓名必须存在',
        'person_type.require' => '人员类别必须存在',
        'swipe_time.require' => '刷卡时间必须存在',
        'swipe_time.date' => '发送的刷卡时间不是一个时间格式',
        'swipe_point.require' => '刷卡门点必须存在',
        'swipe_type.require' => '刷卡事件必须存在',
        'sn.require' => '设备SN码必须存在',
    ];

    


}